package com.hzit.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author wf
 * @since 2023-12-28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity(name="student")
public class Student implements Serializable {

    private static final long serialVersionUID = 1L;

    // 使用分布式id生成器（雪花算法生成器）生成id
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long sid;

    private String sname;

    private String sex;

    private Integer age;

    private String addr;

    private Integer cid;

    private Date birth;

    private Integer deleted;

    private Date createTime;


    private Date updateTime;


    private Integer version;

    public Student(String sname, String sex, Integer age, String addr, Integer cid) {
        this.sname = sname;
        this.sex = sex;
        this.age = age;
        this.addr = addr;
        this.cid = cid;
    }
}
